<?php echo js('admin/settings.js');?>
<div id="page-heading"><h1><?php echo lang('articles.create_title') ?></h1></div>
<?php $this->load->view('partials/notices'); ?>
<form method="post" action="<?php echo site_url('admin/catalog/create_article');?>" >
<table border="0" cellpadding="0" cellspacing="0"  id="id-form">
		<tr>
			<th valign="top"><?php echo lang('articles.status'); ?>:</th>
			<td><?php echo form_dropdown('status', array(1 => lang('global:yes'), 0 => lang('global:no')), $article->status, 'id="status" class="select_box"'); ?></td>
		</tr>
		<tr>
			<th valign="top"><?php echo lang('articles.category_id'); ?>:</th>
			<?php 
			$categories_options = array();
			foreach($categories as $category){
				$categories_options[$category->id] = empty($category->name)? lang('global:empty'): $category->name;
			}
			?>
			<td><?php echo form_dropdown('category_id', $categories_options, $article->category_id, 'id="category_id" class="select_box"'); ?></td>
		</tr>
		<tr>
			<th valign="top"><?php echo lang('articles.sort'); ?>:</th>
			<td><?php echo form_input('sort', $article->sort, 'class="inp-form"'); ?></td>
		</tr>
</table>	
<table border="0" cellpadding="0" cellspacing="0"  id="id-form" style="width:100%;">
		<tr>
			<th colspan="3">
			<div id="usual-tab" class="usual-tab">
				<ul class="idTabs"> 
					<?php foreach($supported_languages as $lang => $content): ?>
						<li><a href="#<?php echo $lang;?>"><span style="font-weight: bold; font-size:12px;"><?php echo $content['name'];?></span></a></li>
					<?php endforeach; ?>
				</ul>
				<?php foreach($supported_languages as $lang => $content): ?>
					<div id="<?php echo $lang;?>" class="lang_content">
						<fieldset>
							<table border="0" cellpadding="0" cellspacing="0"  id="id-form" style="width:100%;">
							<tr>
								<th valign="top"><?php echo lang('articles.name_label'); ?><span class="require">*</span>:</th>
								<td><?php echo form_input('name_'. $lang, $article->{'name_'. $lang}, 'class="inp-form"'); ?></td>
							</tr>
							<tr>
								<th valign="top"><?php echo lang('articles.content'); ?><span class="require">*</span>:</th>
								<td><?php echo form_textarea('content_'. $lang, $article->{'content_'. $lang}, 'class="form-textarea"'); ?>
								<?php echo display_ckeditor(ck_config_simple('content_'. $lang)); ?>
								</td>
							</tr>
							</table>
						</fieldset>	
					</div> 
				<?php endforeach; ?> 
			</div> 
			</th>
		</tr>
	<tr>
		<th>&nbsp;</th>
		<td valign="top">
			<input type="submit" value="" class="form-submit" />
			<input type="reset" value="" class="form-reset"  />
		</td>
		<td></td>
	</tr>
	</table>
</form>	
